home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d504 / polysilicon.lha / PolySiliCon / Install SiliCon / .work_scripts / fixup_startup < prev    next >
Text File  |  1991-06-27  |  4KB  |  139 lines

  1. failat 25
  2. mat >RAM:__check nocase search "mount IP:" T "^F line ^N: ^O" S:Startup(-Sequence|II)
  3. if not warn
  4.     echo "mount request already in Startup-Sequence...:"
  5.     type RAM:__check
  6.     delete >NIL: RAM:__check
  7.     echo "I assume that's OK..."
  8.     skip do_sili
  9. endif
  10. delete >NIL: RAM:__check
  11. delete >NIL: RAM:(_New_S_Seq|_New_SII|_temp_S_SEQ)
  12. echo ""
  13. echo "for automatic mounting of IP: at boot-up"
  14. echo "you should have a 'mount IP:' command in your startup sequence"
  15. echo "I can edit it in automatically if you like now."
  16. jask "-rShall I do this?" -q
  17. if not warn
  18.     echo "OK... We're all done, then."
  19.     skip EXIT_all
  20. endif
  21.  
  22. mat >NIL: search "S:StartupII" nocase S:Startup-Sequence
  23. if not warn
  24.     if not exists S:StartupII
  25.         skip mainseq
  26.     endif
  27.     mat >RAM:_MSII nolines s mount p "mount #?" label "Merge >RAM:_New_SII S:StartupII " t ^N tag ^|0 nocase first S:StartupII label " _WS:IP_Merge^B"
  28.     if not warn
  29.         echo "Other mounts appear to be in file 'S:StartupII'"
  30.     else
  31.         echo "The usual place for mounts is 'S:StartupII'"
  32.     endif
  33.     echo "Unless you think otherwise, I will insert 'mount IP:' there."
  34.     jask "-rEdit 'Mount IP:' into StartupII?" -q
  35.     if not warn
  36.         skip mainseq
  37.     endif
  38.     if exists S:StartupII.BAK
  39.         echo "A previous version of S:StartupII.BAK exists!"
  40.         jask "-roverwrite S:StartupII.BAK?" -q
  41.         if warn
  42.             delete >NIL: S:StartupII.BAK
  43.         else
  44.             echo "OK -- I'll leave startup files alone"
  45.             skip EXIT_all
  46.         endif
  47.     endif
  48.     execute RAM:_MSII
  49.     echo "command inserted (with other mounts if poss.) in S:StartupII"
  50.     echo "The original will be preserved in S:StartupII.BAK"
  51.     copy RAM:_New_SII to S:New_StartupII
  52.     if fail
  53.         skip editfail
  54.     endif
  55.     delete >NIL: RAM:_New_SII
  56.     cd S:
  57.     rename StartupII StartupII.BAK
  58.     rename New_StartupII StartupII
  59.     cd _I_Install_:
  60.     skip do_sili
  61. endif
  62.  
  63. lab mainseq
  64. echo "I will insert the mount command into your main S:Startup-Sequence..."
  65. mat >RAM:_MSII p "# (mount |LoadWB)#?" t "Merge >RAM:_New_S_Seq S:Startup-Sequence ^N _WS:IP_Merge" nocase first S:Startup-Sequence
  66. if warn
  67.         echo "Sorry -- can't decide where to insert it!"
  68.         echo "I'm afraid you'll have to edit S:Startup-Sequence yourself."
  69.         skip editfail
  70. endif
  71. execute RAM:_MSII
  72.  
  73. lab do_sili
  74. mat >RAM:__check nocase search "sili" T "^F line ^N: ^O" S:Startup-Sequence
  75. if not warn
  76.     echo "Startup-Sequence apparently already loads Sili(CON:):"
  77.     type RAM:__check
  78.     delete >NIL: RAM:__check
  79.     echo "I assume that's OK..."
  80.     skip done_ss
  81. endif
  82. delete >NIL: RAM:__check
  83. echo ""
  84. echo "You can start Sili(CON:) at boot up"
  85. echo "with suitable commands in your startup sequence"
  86. echo "I can edit these in automatically if you like now."
  87. jask "-rShall I do this?" -q
  88. if not warn
  89.     echo "OK... not putting SiliCon in Startup"
  90.     skip done_ss
  91. endif
  92. if exists RAM:_New_S_Seq
  93.     copy RAM:_New_S_Seq RAM:_temp_S_Seq
  94. else
  95.     copy S:Startup-Sequence RAM:_temp_S_Seq
  96. endif
  97. mat >RAM:_MSII p "# endcli#?" t "Merge >RAM:_New_S_Seq RAM:_temp_S_Seq -^N _WS:Sili_Merge" nocase first RAM:_temp_S_Seq
  98. if warn
  99.         echo "Sorry -- can't decide where to insert it!"
  100.         echo "I'm afraid you'll have to edit S:Startup-Sequence yourself."
  101.         skip done_ss
  102. endif
  103. execute RAM:_MSII
  104.  
  105.  
  106. lab done_ss
  107. if exists RAM:_New_S_Seq
  108.     copy RAM:_New_S_Seq to S:New_Startup-Sequence
  109.     if fail
  110.         skip editfail
  111.     endif
  112.     delete >NIL: RAM:_New_S_Seq
  113.     echo "commands inserted in S:Startup-Sequence"
  114.     echo "The original will be preserved in S:Startup-Sequence.BAK"
  115.     if exists S:Startup-Sequence.BAK
  116.         echo "A previous version of S:Startup-Sequence.BAK exists!"
  117.         jask "-roverwrite S:Startup-Sequence.BAK?" -q
  118.         if warn
  119.             delete >NIL: S:Startup-Sequence.BAK
  120.         else
  121.             echo "OK -- I'll leave Startup-Sequence alone"
  122.             echo "The revised file is `S:New_Startup-Sequence'"
  123.             skip done
  124.         endif
  125.     endif
  126.     cd S:
  127.     rename Startup-Sequence Startup-Sequence.BAK
  128.     rename New_Startup-Sequence Startup-Sequence
  129.     cd _I_Install_:
  130. endif
  131. skip done
  132.  
  133. lab editfail
  134.     echo "Editing of Startup Sequence FAILED!"
  135.     echo " -- original files left undisturbed."
  136.  
  137. lab done
  138.  
  139.